<template>
  <div>
    <div class="detailsBox">

      <p>
        <span>产品类型：</span><em>{{examineDetails.productType&&$formatter.switchName('productType',examineDetails.productType)}}</em>
      </p>
      <p><span>楼栋号：</span><em>{{examineDetails.buildingNames}}</em></p>
      <p><span>预计预售证上传日期：</span><em>{{examineDetails.preUploadDate}}</em></p>
      <!-- <p><span>附件资料：</span><em><a :href="item.imageURL" v-for="(item,index) in examineDetails.imageVOS" :key="index">{{item.imageName}}</a></em></p> -->
      <p><span>附件资料：</span><em class="downBox"><i @click="fujianDown(item)"
            v-for="(item,index) in examineDetails.imageVOS"
            :key="index">{{item.imageName}}</i></em>
      </p>
      <p><span>提前开售原因：</span><em>{{examineDetails.reason}}</em></p>
      <p><span>提交审核时间：</span><em>{{examineDetails.submitTime}}</em></p>
      <p><span>提交人：</span><em>{{examineDetails.submitName}}</em></p>
      <p><span>审核结果：</span>

        <em
          style="color:red">{{$formatter.switchName('buildingApproveStatus',examineDetails.approveStatus)}}</em>

      </p>
      <p v-if="examineDetails.approveStatus!='0'"><span>审核内容：</span>

        <em>{{examineDetails.content}}</em>

      </p>
      <p v-if="examineDetails.approveStatus!='0'">
        <span>审核时间：</span><em>{{examineDetails.approveTime}}</em></p>
      <p v-if="examineDetails.approveStatus!='0'">
        <span>审核人：</span><em>{{examineDetails.approveName}}</em></p>
    </div>
    <div class="examineBtn">
      <Button @click="modalCancel">关闭</Button>
    </div>

  </div>
</template>
<script>
  import toolApi from '@/biz/base/tool'
  export default {
    props: ['examineDetails'],
    data() {
      return {}
    },
    watch: {
      examineDetails(newVal, oldVal) {
        this.examineDetails = newVal
      },
    },
    methods: {
      fujianDown(val) {
        toolApi.downloadFile(val.imageURL, val.imageName)
      },

      modalCancel() {
        this.$emit('detailsCancel')
      },
    },
  }
</script>
<style lang="scss" scoped>
  .detailsBox {
    width: 100%;
    overflow: hidden;

    p {
      float: left;
      min-width: 50%;
      line-height: 2;
      display: flex;
      flex-direction: row;
      margin-top: 10px;
      overflow: hidden;

      span {
        display: inline-block;
        width: 150px;
        text-align: right;
      }

      em {
        font-style: normal;
        flex: 1;
      }
    }
  }

  .btn {
    text-align: center;
    margin-top: 30px;
  }

  .examineBtn {
    display: flex;
    flex-direction: row;
    justify-content: space-around;
    padding: 30px 100px 10px;
  }

  .downBox {
    >i {
      color: #2d8cf0;
      display: block;
      font-style: normal;
      cursor: pointer;
    }
  }
</style>